from datasets import create_dataloader, create_dataset
import os
import torchvision

EXPERENT = "Other10"

if __name__ == "__main__":
    # create dataloader
    train_set = create_dataset("LRHR", "val", EXPERENT)
    train_loader = create_dataloader(train_set, "test")
    index = 1

    for img_hr, img_lr in train_loader:
        if not os.path.exists("./datasets/test/"+EXPERENT+"_renamed"):
            os.makedirs("./datasets/test/"+EXPERENT+"_renamed")
        torchvision.utils.save_image(
            img_hr, ("./datasets/test/"+EXPERENT+"_renamed"+"/index_"+str(index)+".jpg"))
        index += 1
